﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CinemaSystem
{
    public partial class qrzf : Form
    {
        public qrzf()
        {
            InitializeComponent();
        }
       public static string chang = gpck.chang;
        public static string dating = gpck.dating;
        public static string wei = gpck.wei;
        public static int id = ypck.id;
        private void qrzf_Load(object sender, EventArgs e)
        {
            label3.Text = chang;
            chang = gpck.chang;
            label3.Text = chang;
            label4.Text = dating;
            dating = gpck.dating;
            label4.Text = dating;
            label6.Text = wei;
            wei = gpck.wei;
            label6.Text = wei;
            string sqlstr = string.Format("select * from Movie");
            DataTable dt = DBHelper.GetDataTable(sqlstr);
            
           
            label10.Text = dt.Rows[id]["Moviename"].ToString();
        }
        public static string yong = DengluForm.yong;
       
        private void button1_Click(object sender, EventArgs e)
        {
            string sqlstr = string.Format("insert into [Order] values('{0}','{1}','{2}','{3}','{4}')", label10.Text, yong, label6.Text, label3.Text, label4.Text);
            int i = DBHelper.ExecuteNonQuery(sqlstr);
            if (i > 0)
            {
                dingdan dingdan = new dingdan();
                dingdan.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("wwe");
            }
        }
    }
}
